package com.jier.vo;

import com.jier.common.Page;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author jie_r
 * @date 2018/1/5
 */
public class PageVo {
    /**
     * 每页的行数
     */
    @ApiModelProperty(value = "每页的行数", dataType = "Integer")
    private Integer rowPerPage;
    /**
     * 当前的页数
     */
    @ApiModelProperty(value = "当前的页数", dataType = "Integer")
    private Integer curPage;
    /**
     * 总行数
     */
    @ApiModelProperty(value = "总行数", dataType = "Integer")
    private Integer totalRows;
    /**
     * 总页数
     */
    @ApiModelProperty(value = "总页数", dataType = "Integer")
    private Integer totalPages;

    public PageVo(Page page) {
        this.rowPerPage = page.getRowPerPage();
        this.curPage = page.getCurPage();
        this.totalRows = page.getTotalRows();
        this.totalPages = page.getTotalPages();
    }

    public Integer getRowPerPage() {
        return rowPerPage;
    }

    public void setRowPerPage(Integer rowPerPage) {
        this.rowPerPage = rowPerPage;
    }

    public Integer getCurPage() {
        return curPage;
    }

    public void setCurPage(Integer curPage) {
        this.curPage = curPage;
    }

    public Integer getTotalRows() {
        return totalRows;
    }

    public void setTotalRows(Integer totalRows) {
        this.totalRows = totalRows;
    }

    public Integer getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }
}
